﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="ProjectStudy.UserInfo.UserInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
   <style type="text/css">
table.altrowstable {
	font-family: verdana,arial,sans-serif;
	font-size:16px;
	color:#333333;
	border-width: 1px;
	border-color: #a9c6c9;
	border-collapse: collapse;
}
table.altrowstable th {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #a9c6c9;
}
table.altrowstable td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #a9c6c9;
}
.oddrowcolor{
	background-color:#d4e3e5;
}
.evenrowcolor{
	background-color:#c3dde0;
}
</style>
    <script type="text/javascript">
        $(function () {
            $.ajax({
                type: "post",
                url: "/Ajax/Ajax_UserManage.ashx",
                data: { "action": "GetUserInfo" },
                dataType: "json",
                success: function (data) {
                    if (data != null && data != '') {
                                var isactive = data[0].isActive == "Y" ? "已激活" : "未激活";
                                var islock = data[0].isLock == "Y" ? "已锁定" : "未锁定";
                                $("#lbUserName").html(data[0].username);
                                $("#lbSex").html(data[0].sex);
                                $("#lbGroup").html(data[0].group);
                                $("#lbEmail").html(data[0].email);
                                $("#lbQuestion").html(data[0].question);
                                $("#lbAnswer").html(data[0].answer);
                                $("#lbActive").html(isactive);
                                if (isactive == "已激活") {
                                    $("#lbActive").css("color", "Green");
                                }
                                else {
                                    $("#lbActive").css("color", "Red");
                                }
                                $("#lbLock").html(islock);
                                if (islock == "已锁定") {
                                    $("#lbLock").css("color", "Red");
                                }
                                else {
                                    $("#lbLock").css("color", "Green");
                                }
                                $("#lbRegisterTime").html(data[0].registerTime.replace('T', ' '));
                    }
                }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table class="altrowstable">
      <tr>
        <td>账号:</td>
        <td><label id="lbUserName"></label></td>
      </tr>
      <tr>
        <td>性别:</td>
        <td><label id="lbSex"></label></td>
      </tr>
      <tr>
        <td>用户组:</td>
        <td><label id="lbGroup"></label></td>
      </tr>
      <tr>
        <td>邮箱:</td>
        <td><label id="lbEmail"></label></td>
      </tr>
      <tr>
        <td>问题:</td>
        <td><label id="lbQuestion"></label></td>
      </tr>
      <tr>
        <td>答案:</td>
        <td><label id="lbAnswer"></label></td>
      </tr>
      <tr>
        <td>激活状态:</td>
        <td><label id="lbActive"></label></td>
      </tr>
      <tr>
        <td>锁定状态:</td>
        <td><label id="lbLock"></label></td>
      </tr>
      <tr>
        <td>注册时间:</td>
        <td><label id="lbRegisterTime"></label></td>
      </tr>
    </table>
    </div>
    </form>
</body>
</html>
